//menu
export interface MenuTreeListItem {
  menu_id: number;
  menu_name: string;
  route_name: string;
  menu_type: number;
  status: number;
  icon: string;
  component: string;
  permission: string;
  path: string;
  no_cache: number;
  parent_id: number;
  visible: number;
  is_frame: number;
  sort: number;
  created_at: string;
  updated_at: string;
  children?: MenuTreeListItem[];
}

export interface CreateMenuReq {
  menu_name: string;
  route_name: string;
  parent_id: number;
  sort: number;
  status: number;
  component: string;
  is_frame: number;
  no_cache: number;
  path: string;
  visible: number;
  permission: string;
}

export interface UpdateMenuReq extends CreateMenuReq {
  menu_id: number;
}

export interface CreateMenuActionReq {
  menu_name: string;
  parent_id: number;
  sort: number;
  status: number;
  permission: string;
  api_ids: number[];
}

export interface UpdateMenuActionReq extends CreateMenuActionReq {
  menu_id: number;
}

//menu
export type GetMenuTreeListRes = MenuTreeListItem[];
